In semiconductor technologies, critical-dimension (CD) variations can be induced by optical interference and other effects. As a result, a mask error factor (MEF) will become too high and unacceptable for smaller feature sizes in sub-wavelength patterning, especially for contact holes. Various techniques have been implemented to improve MEF, including using a phase shift mask (PSM) and/or optical proximity correction (OPC) to form photomask patterns. However, conventional phase shift masks provide limited help on MEF control and quartz etching which is generally adopted for generation of multiple phases often introduce various issues, including increased manufacturing cost and reduced processing control (such as processing window relative to an expected phase shift).